<html>
<header>
  <meta charset="utf-8" />
  <link href="<%=staticRelativePath%>/normalize.css" rel="stylesheet" type="text/css" />
  <link rel="stylesheet" href="<%=staticRelativePath%>/iconfont/iconfont.css">
  <style type="text/css">
    table {
      width: 100%;
    }

    table,
    th,
    td {
      border: 1px solid black;
      text-align: center;
    }
    table, th,span {
      font-weight: bold;
    }
    table,td{
      font-weight: normal;
    }
    .table-margin-top {
      margin-top: 20px;
    }
    hr {
      align-content: center;
      width: 100%;
      margin-top: 20px;
      margin-bottom: 20px;
    }

  </style>
</header>

<body style="padding-top: 15px;">

  <div style="text-align: center">
    <h1><%= reportName %></h1>
  </div>
  <div style="text-align: right;font-weight: bold;"><span>日期：<%= reportTime %>&nbsp;&nbsp;</span></div>
  <div>
    <table>
      <tbody>
        <tr>
          <th>项目名称</th>
          <td colspan="2">
            <%= overview.projectName %>
          </td>
        </tr>
        <tr>
          <th>版本号</th>
          <td colspan="2">
            <%= overview.versionName%>
          </td>
        </tr>
        <tr>
          <th rowspan="6">测试概况(测试对象统计)</th>
          <td>文件（个）</td>
          <td>
            <%= overview.fileCount %>
          </td>
        </tr>
        <tr>
          <td>总行数</td>
          <td>
            <%= overview.totalLines %>
          </td>
        </tr>
        <tr>
          <td>注释行数</td>
          <td>
            <%= overview.commentLines %>
          </td>
        </tr>
        <tr>
          <td>注释率</td>
          <td>
            <%= overview.commentLinesRate %>
          </td>
        </tr>
        <tr>
          <td>可执行行数</td>
          <td>
            <%= overview.executableLines %>
          </td>
        </tr>
        <tr>
          <td>空行</td>
          <td>
            <%= overview.emptyLines %>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
  <hr/>
  <div>
    <div style="text-align: left;"><span>头文件度量结果</span></div>
    <div>
      <table>
        <tbody>
          <tr>
            <th>文件个数</th>
            <th>总行数</th>
            <th>注释行数</th>
            <th>注释率</th>
            <th>空行</th>
            <th>可执行行数</th>
          </tr>
          <tr>
            <td><%= headerFiles.files.length %></td>
            <td><%= headerFiles.totalLines %></td>
            <td><%= headerFiles.commentLines %></td>
            <td><%= headerFiles.commentLinesRate %></td>
            <td><%= headerFiles.emptyLines %></td>
            <td><%= headerFiles.executableLines %></td>
        </tr>
        </tbody>
      </table>
    </div>
    <div class="table-margin-top">
      <table>
        <tbody>
          <tr>
            <th>文件名</th>
            <th>总行数</th>
            <th>注释行数</th>
            <th>注释率</th>
            <th>空行</th>
            <th>可执行行数</th>
          </tr>
          <% for (let index = 0; index < headerFiles.files.length; index +=1) { 
            const file = headerFiles.files[index]; %>
            <tr>
              <td><%= file.fileName %></td>
              <td><%= file.totalLines %></td>
              <td><%= file.commentLines %></td>
              <td><%= file.commentLinesRate %></td>
              <td><%= file.emptyLines %></td>
              <td><%= file.executableLines %></td>
            </tr>
          <% } %>
        </tbody>
      </table>
    </div>
    <hr/>
    <div style="text-align: left;"><span>源文件度量结果</span></div>
    <div>
      <div>
        <table>
          <tbody>
            <tr>
              <th>文件个数</th>
              <th>总行数</th>
              <th>注释行数</th>
              <th>注释率</th>
              <th>空行</th>
              <th>可执行行数</th>
            </tr>
            <tr>
              <td><%= sourceFiles.files.length %></td>
              <td><%= sourceFiles.totalLines %></td>
              <td><%= sourceFiles.commentLines %></td>
              <td><%= sourceFiles.commentLinesRate %></td>
              <td><%= sourceFiles.emptyLines %></td>
              <td><%= sourceFiles.executableLines %></td>
          </tr>
          </tbody>
        </table>
      </div>
      <div class="table-margin-top">
        <table>
          <tbody>
            <tr>
              <th>文件名</th>
              <th>总行数</th>
              <th>注释行数</th>
              <th>注释率</th>
              <th>空行</th>
              <th>可执行行数</th>
            </tr>
            <% for (let index = 0; index < sourceFiles.files.length; index += 1) { 
              const file = sourceFiles.files[index]; %>
              <tr>
                <td><%= file.fileName %></td>
                <td><%= file.totalLines %></td>
                <td><%= file.commentLines %></td>
                <td><%= file.commentLinesRate %></td>
                <td><%= file.emptyLines %></td>
                <td><%= file.executableLines %></td>
              </tr>
            <% } %>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</body>

</html>
